FROM python:3.7

WORKDIR /app
COPY . .
# 创建用于存放字体的目录
RUN mkdir -p /usr/share/fonts/myfonts
# 复制字体到镜像中
RUN cp simsun.ttc /usr/share/fonts/myfonts && rm simsun.ttc
# 刷新
RUN fc-cache -fv
# 设置环境变量，让程序能够找到中文字体
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8

# 修改软件源
RUN  apt-get update \
    && apt-get install -y dos2unix \
    && dos2unix ./start.sh \
	&& chmod 777 ./start.sh

RUN pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ ./data_report-1.0.0-py3-none-any.whl \
  && rm -f ./data_report-1.0.0-py3-none-any.whl

ENTRYPOINT ["./start.sh"]
